# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=chopshop
pkgver=444.8bdd393
pkgrel=3
pkgdesc='Protocol Analysis/Decoder Framework.'
groups=('blackarch' 'blackarch-networking' 'blackarch-reversing')
arch=('any')
url='https://github.com/MITRECND/chopshop'
license=('MIT')
depends=('python2' 'python2-pynids' 'python2-pymongo' 'python2-yaraprocessor'
         'python2-m2crypto' 'python2-pylibemu' 'python2-dnslib')
makedepends=('git')
source=("git+https://github.com/MITRECND/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  make PYTHON=/usr/bin/python2 PREFIX="$pkgdir/usr" install

  sed -i "s|$pkgdir/usr/libexec/chopshop|/usr/libexec/chopshop|" \
    "$pkgdir/usr/bin/$pkgname"
}

